This invention relates to the field of computing and, in particular, to methods, computer program products, and hardware products for providing program individuality analysis for source code programs.
Code review and inspection are techniques for identifying software defects (bugs) through manual examination of the source code. While these techniques are known to be effective in uncovering various defects which are difficult to detect by other means such as automated bug detection tools and testing tools, they are human-based approaches and, as such, are inherently labor-intensive processes. The amount of code developed in real software projects is often very large, which renders inspecting all of the code impractical. A solution to this problem is to locate, as a pre-process, which parts of the code are more likely to contain defects, and focus on inspecting those parts. Unfortunately, this has not been widely realized yet since there are few viable methods that can be used to automatically identify defect-prone parts in the source code.
It is known that miscommunication between developers is one of the most common causes of consistency errors. Thus, if certain code parts were written by multiple developers, it is reasonable to assume that these parts are more likely to be prone to consistency errors. Even if a code management system is employed to keep records of who edited each part of the source files, it is not unusual that code-reviewers often can only obtain access to the latest version of the source code (not the change history) due to restrictions inherent to the process in which an inspection is performed.
There are various existing tools for checking and correcting coding styles based on the viewpoint that a coding style should be standardized to improve source code quality. Illustrative examples of these tools include: (1) astyle (Artistic Style), http://sourceforge.net/projects/astyle/; (2) FxCop, http://www.gotdotnet.com /team/fxcop/; (3) Checkstyle, http://checkstyle.sourceforge.net/; (4) VB Law, http://www.visibleprogress.com/vb_law.htm; and (5) cxxchecker, https://gna.org/projects/cxxchecker/. These tools works by (a) defining or extracting the “correct” coding style convention for the target source code and (b) checking whether the code violates the correct style. The coding style convention mentioned above is actually a set of rules defining how each source code should be written. These conventional tools automatically process coding styles. However, conventional tools are not well adapted for certain settings, especially in situations where it is assumed that there is a “correct” coding style followed by a particular developer and not by others.